<!-- 右下角的新建数据页 -->
<template>
	<div class="mask">
		<div class="nav"></div>
		<div class="top">
			<div class="left">
				<view class="div">
					<text class="one">{{currentDay}}</text>
					<text class="two">{{ currentMonth }}/{{currentYear}}</text>
				</view>
				<view class="three">星期{{currentWeekday}}</view>
			</div>
			
			<div class="right">
				<image src="../../../static/diImage/雷阵雨.png" mode=""></image>
				<view class="div">
					<view>深圳市</view>
					<view>阵雨/32°C</view>
				</view>
			</div>
		</div>
		<div class="center">
			<div class="ul">
				<div class="li">
					<div class="div">
						<image src="../../../static/diImage/安排日程.png" mode=""></image>
					</div>
					<div class="p">安排日程</div>
				</div>
				<div class="li">
					<div class="div">
						<image src="../../../static/diImage/安排任务.png" mode=""></image>
					</div>
					<div class="p">安排任务</div>
				</div>
				<div class="li">
					<div class="div">
						<image src="../../../static/diImage/办公申请.png" mode=""></image>
					</div>
					<div class="p">办公申请</div>
				</div>
				<div class="li">
					<div class="div">
						<image src="../../../static/diImage/发布动态.png" mode=""></image>
					</div>
					<div class="p">发布动态</div>
				</div>
				<div class="li">
					<div class="div">
						<image src="../../../static/diImage/写进跟进.png" mode=""></image>
					</div>
					<div class="p">写进跟进</div>
				</div>
				<div class="li">
					<div class="div">
						<image src="../../../static/diImage/工作报告.png" mode=""></image>
					</div>
					<div class="p">工作报告</div>
				</div>
				<div class="li">
					<div class="div">
						<image src="../../../static/diImage/考勤打卡.png" mode=""></image>
					</div>
					<div class="p">考勤打卡</div>
				</div>
				<div class="li">
					<div class="div">
						<image src="../../../static/diImage/签到.png" mode=""></image>
					</div>
					<div class="p">外勤签到</div>
				</div>
			</div>
			<div class="ul">
				<div class="li">
					<div class="div">
						<image src="../../../static/diImage/新建线索.png" mode=""></image>
					</div>
					<div class="p">新建线索</div>
				</div>
				<div class="li">
					<div class="div">
						<image src="../../../static/diImage/新建客户.png" mode=""></image>
					</div>
					<div class="p">新建客户</div>
				</div>
				<div class="li">
					<div class="div">
						<div class="div">
							<image src="../../../static/diImage/新建联系人.png" mode=""></image>
						</div>
					</div>
					<div class="p">新建联系人</div>
				</div>
				<div class="li">
					<div class="div">
						<image src="../../../static/diImage/新建商机.png" mode=""></image>
					</div>
					<div class="p">新建商机</div>
				</div>
				<div class="li">
					<div class="div">
						<image src="../../../static/diImage/新建订单.png" mode=""></image>
					</div>
					<div class="p">新建订单</div>
				</div>
				<div class="li">
					<div class="div">
						<image src="../../../static/diImage/新建回款.png" mode=""></image>
					</div>
					<div class="p">新建回款</div>
				</div>
				<div class="li">
					<div class="div">
						<image src="../../../static/diImage/新建报销.png" mode=""></image>
					</div>
					<div class="p">新建报销</div>
				</div>
				<div class="li">
					<div class="div">
						<image src="../../../static/diImage/上传文档.png" mode=""></image>
					</div>
					<div class="p">上传文档</div>
				</div>
			</div>
		</div>
		<div class="bottom">
			<image src="../../../static/diImage/X.png" @click="add" mode=""></image>
		</div>
	</div>
</template>

<script>
	export default {
		data() {
			return {
				 currentDate: new Date(),
			}
		},
		methods: {
			// 跳转到首页
			add(){
				uni.reLaunch({
					url:'/pages/shou/shou'
				})
			}
		},
		computed: {
			// 获取当前是那一天
			currentDay() {
			      return this.currentDate.getDate();
			    },
				// 获取当前是第几月
		    currentMonth() {
		      return this.currentDate.getMonth() + 1;
		    },
			// 获取当前是哪一年
			currentYear() {
			      return this.currentDate.getFullYear();
			    },
			// 获取当前是星期几
			currentWeekday() {
			      const weekdays = ["日", "一", "二", "三", "四", "五", "六"];
			      const weekdayIndex = this.currentDate.getDay();
			      return weekdays[weekdayIndex];
			    }
		  }
	}
</script>

<style lang="scss">
.nav{
	height: 40px;
}
.mask{
	width: 100%;
	height: 100vh;
	padding: 0 15px;
	display: flex;
	flex-direction: column;
	.top{
		width: 100%;
		height: 100px;
		display: flex;
		align-items: center;
		.left{
			width: 50%;
			height: 100%;
			display: flex;
			flex-direction: column;
			justify-content: space-evenly;
			.one{
				font-size: 40px;
				font-weight: 600;
				margin-right: 10px;
				color: #666666;
			}
			.two{
				font-size: 20px;
				color: #666666;
			}
			.three{
				color: #666666;
				font-weight: 600;
				font-size: 20px;
			}
		}
		.right{
			width: 50%;
			height: 100%;
			display: flex;
			align-items: center;
			image{
				margin-right: 10px;
			}
		}
	}
	.center{
		width: 100%;
		flex: 1;
		.ul{
			width: 100%;
			display: flex;
			flex-wrap: wrap;
			margin-top: 30px;
			.li{
				width: 25%;
				height: 100px;
				display: flex;
				flex-direction: column;
				justify-content: space-evenly;
				align-items: center;
				.div{
					width: 120rpx;
					height: 120rpx;
					border-radius: 50%;
					background-color: #e4e4e4;
					display: flex;
					align-items: center;
					justify-content: center;
					image{
						width: 60rpx;
						height: 60rpx;
					}
				}
			}
		}
	}
	.bottom{
		width: 100%;
		height: 100px;
		display: flex;
		align-items: center;
		justify-content: center;
	}
}
image{
	width: 50px;
	height: 50px;
}
</style>
